<template>
  <div>
    <div class="recommend-title">热销推荐</div>
    <ul>
      <li class="itme border-bottom" v-for="itme of list" :key="itme.id">
        <div class="itme-img-wrapper">
          <img class="itme-img" :src="itme.imgUrl"/>
        </div>
        <div class="itme-info">
          <p class="itme-title">{{ itme.title }}</p>
          <p class="itme-desc">{{ itme.desc }}</p>
          <button class="itme-botton">查看详情</button>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/mixins.styl'

.recommend-title{
  line-height:0.8rem;
  background:#eee;
  text-indent:0.2rem;
  margin-top:0.2rem;
}
.itme{
  overflow:hidden;
  display:flex;
  height:1.9rem;
}
.itme-img{
  width:1.7rem;
  height:1.7rem;
  padding:0.1rem;
}
.itme-info{
  flex:1;
  padding:0.1rem;
  min-width:0;
}
.itme-title{
  line-height:0.54rem;
  font-size:0.32rem;
  ellipsis();
}
.itme-desc{
  line-height:0.5rem;
  color:#ccc;
  ellipsis();
}
.itme-botton{
  background:#ff9300;
  padding:0 0.1rem;
  border-radius:0.06rem;
  color:#fff;
  margin-top:0.16rem;
}
</style>
